package scheduler.core.utils;

/**
 *
 * @author Volodymyr Pogorelov
 */
public class Utils {
    public static double calcP0(int n, double Ro){
        double acc1 = 1;
        double acc2 = 1;
        double res = 0;
        for (int i = 0; i <= n; i++){
            res += acc1*acc2;
            acc1 *= (n - i);
            acc2 *= Ro;
        }
        return (1.00 / res);
    }
}
